/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.entity;

import com.chlitina.store.common.persistence.BaseEntity;

/**
 * 解决方案与产品复合主键
 * @author lvbo
 * @version 2013-06-08
 */
public class SolutionFaceCarePK extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private SolutionFace solutionFace; 	// 方案
	private Care care; 	// 护理

	public SolutionFaceCarePK() {
	}

	public SolutionFaceCarePK(SolutionFace solutionFace, Care care) {
		this.solutionFace = solutionFace;
		this.care = care;
	}

	public SolutionFace getSolutionFace() {
		return solutionFace;
	}


	public void setSolutionFace(SolutionFace solutionFace) {
		this.solutionFace = solutionFace;
	}

	public Care getCare() {
		return care;
	}


	public void setCare(Care care) {
		this.care = care;
	}

	@Override
	public int hashCode() {
		return this.solutionFace.hashCode() + this.care.hashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final SolutionFaceCarePK other = (SolutionFaceCarePK) obj;
		if (solutionFace.getId() == other.getSolutionFace().getId() &&
				care.getId() == other.getCare().getId()) {
			return true;
		} 
		return false;
	}
}
